<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page isELIgnored="false" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-html"  prefix="html"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <link href="CSS/Accessible_Design.css" rel="stylesheet" type="text/css" />
    <title> 添加角色</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
 <script type="text/javascript" language="java">
  function selectid(object){
	  var namelist=document.getElementsByName('roleid');
	  for(var i=0;i<namelist.length;i++)
		  {
		  var e=namelist[i];
		  e.checked=object.checked;
		  }
  }
 
 </script>

  </head>
  
  <body>
  <html:form action="roledelete.do">
  <table width="476" height="115" border="1" cellspacing="0" class="small">
  <tr>
    <td colspan="4" align="center">角色管理</td>
  </tr>
  <tr>
    <td width="60">
    	<html:checkbox property="deleteallrole" onclick="selectid(this)">全选</html:checkbox>
    </td>
    <td width="111">角色编号</td>
    <td width="112">角色名称</td>
    <td width="112">修改</td>
  </tr>
   <c:forEach items="${rolelist}" var="roleall">
	  <tr>
	    <td height="24"><label>
	    <html:checkbox property="roleid"  value="${roleall.roleId}" ></html:checkbox>
	   
	    </label></td>
	    <td>${roleall.roleId }</td>
	    <td>${roleall.roleName}</td>
	    <td><a href="changerole.do?id=<c:out value='${roleall.roleId}'/>">详细</a></td>
	    
	     
  </c:forEach>
  <tr>
    <td height="25">
    	<html:submit property="" value="删除"></html:submit>
    </td>
    <td colspan="3">
   <a href="admin/addrole.jsp">添加</a></td>
  </tr>
  
  <tr>
  <td colspan="4" align="center"> <a href="rolemag.do?pageNum=${firstPage}">首页</a>|<a href="rolemag.do?pageNum=${proPage}">上一页</a>|<a href="rolemag.do?pageNum=${nextPage}">下一页</a>|<a href="rolemag.do?pageNum=${lastPage}">最后一页</a> </td>
  
  </tr>
</table>
</html:form>
  </body>
</html>
